<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>成员管理</title>
<link rel="stylesheet"
	href="<%=path%>/res/common/bootstrap-3.3.7-dist/css/bootstrap.min.css" />
</head>
<body>

	<table class="table table-striped">
		<tr>
			<th colspan="7" style="text-align: center;">成员管理</th>
		</tr>
		<tr>
			<th colspan="7">


				<form action="<%=path %>/studentGroupByClass" method="post"
					class="navbar-form ">
					<div class="col-sm-2">
						<select name="classoption"
							class="selectpicker show-tick form-control">
							<c:if test="${classId != null}">
								<option value="${classId}">${className}</option>
							</c:if>
							<option value="所有班级">所有班级</option>
							<c:forEach var="li" items="${classNameList}" begin="0"
								end="${classNameList.size()}" varStatus="vs">
								<option value="${li.classId }">${li.className }</option>
							</c:forEach>
						</select>
					</div>

					<input type="text" name="studentName" id="studentName"
						value="${studentName}" class="form-control" placeholder="姓名">

					<button type="submit" class="btn btn-default">搜索</button>
				</form>
			</th>
		</tr>
		<tr>
			<td>序号</td>
			<td>班级</td>
			<td>学生姓名</td>
			<td>博客数</td>
			<td>随笔数</td>
			<td>评论数</td>
			<td>操作</td>
		</tr>
		<c:forEach var="vo" items="${list}" varStatus="vs">
			<tr>
				<td>${vs.index+1}</td>
				<td>${vo.className}</td>
				<td><a href="<%=path %>/stuinformation/${vo.stuId}.do"
					class="sidebar-nav-menu">${vo.stuName}</a></td>
				<td>${vo.blogNumber}</td>
				<td>${vo.stuFans}</td>
				<td>${vo.stuFocus}</td>
				<td><a href="<%=path %>/recordFromStudent/${vo.stuId}.do">TA的数据</a>&nbsp|&nbsp
					
<a href="<%=path %>/stumemberDelete/${vo.stuId}.do">删除</a>&nbsp|&nbsp 
					<a href="<%=path %>/oneCrawler/${vo.stuId }.do">采集</a></td>
			</tr>
		</c:forEach>

	</table>
	<%
	String studelete = (String)request.getAttribute("studelete"); 
	String onecraw = (String)request.getAttribute("onecraw"); 
	if (studelete == "1") {
	%>
		<script type="text/javascript">
        	alert("学生成功已成功删除");
		</script>
	<% 
	}
	if (onecraw == "1") {
		%>
			<script type="text/javascript">
	        	alert("采集成功");
			</script>
		<% 
		}
	%>

</body>
</html>